
<html>
<%@ page import="java.sql.*" %>
<center><img src="images/15.jpeg" border=0 width=363 height=228><img src="images/5.jpeg" border=0 width=263 height=228> <img src="images/1.jpeg" border=0 width=263 height=228>
<body bgcolor="#fdfec5" >
<%
try
{

String cname=request.getParameter("cname");
String cpwd=request.getParameter("cpwd");

  Class.forName("oracle.jdbc.driver.OracleDriver");
   Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","bank","bank");
  Statement st=con.createStatement();
 ResultSet rs=st.executeQuery("select accno from customer where name='"+cname+"' and pin='"+cpwd+"'");
 if(rs.next())
 {
 	System.out.println("Mapping to some otherpage");
    response.sendRedirect("Index.html"); 
	session.setAttribute("pin",rs.getInt(1));
}
else
	{
	response.sendRedirect("login.jsp"); 

}
}
catch(Exception e){
e.printStackTrace();
}
%>
</body>
</html>